package com.design.yjx.command.common;

/**
 * @author yuanjianxin
 * @date 2017/8/21 14:51
 */
public class FanOffCommand implements Command {
    private Fan fan;

    public FanOffCommand(Fan fan) {
        this.fan = fan;
    }

    @Override
    public void execute() {
        fan.off();
    }

    @Override
    public void undo() {
        fan.on();
    }
}
